#include <REGX52.H>
#include "onewire.h"
void ConvertT(void){
	Onewire_Init();
	Sendbyte(0xcc);
	Sendbyte(0x44);
}
float ReadT(void){
	float T=0;
	int temp=0;
	unsigned char Tlsb,Mlsb;
	Onewire_Init();
	Sendbyte(0xcc);
	Sendbyte(0xbe);
	Tlsb=Acbyte();
	Mlsb=Acbyte();
	temp=(Mlsb<<8)|Tlsb;//自己会强制转换成int
	T=temp/16.0;
	return T;
}
